import { ref } from "vue";
import { parseTime } from "@/utils/ruoyi";
import type { AvueCrudOption } from "@smallwei/avue";

export default function () {
  const option: AvueCrudOption = {
    rowKey: "id",
    align: "center",
    delBtn: false,
    searchShow: false,
    column: [
      {
        prop: "menuName",
        label: "菜单名称",
        search: true,
      },
      {
        prop: "icon",
        label: "图标",
      },
      {
        prop: "orderNum",
        label: "排序",
      },
      {
        prop: "perms",
        label: "权限标识",
      },
      {
        type: "select",
        prop: "status",
        label: "状态",
        search: true,
      },
      {
        prop: "createTime",
        label: "创建时间",
        formatter: (row: any) => {
          return parseTime(row.createTime);
        },
      },
    ],
  };
  return ref(option);
}
